# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libxfont2
pkgver=2.0.5
pkgrel=0
pkgdesc="X.Org X11 libXfont2 runtime library"
url="https://www.x.org"
arch="all"
license="MIT"
options="!check"  # No test suite.
makedepends="$depends_dev libfontenc-dev freetype-dev zlib-dev xtrans
	util-macros autoconf automake libtool xorgproto"
subpackages="$pkgname-dev"
source="https://www.x.org/pub/individual/lib/libXfont2-$pkgver.tar.bz2"
builddir="$srcdir/libXfont2-$pkgver"

# secfixes:
#   2.0.3-r0:
#     - CVE-2017-16611

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-static \
		--without-fop
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
64d0635d14676bb645d61932afb177eb3808a46525b26e7ee31abc975eca75207743e85523fdd82b08010ce124eb4802338b508ee7b126875d2a3c12f8ac4faa  libXfont2-2.0.5.tar.bz2
"
